<?php
$materialModel = MaterialWarehouseInboundItem::model();
$this
	->widget('zii.widgets.grid.CGridView',
		array(
			'id' => 'material-warehouse-inbound-item-grid',
			'dataProvider' => new CArrayDataProvider($items, array(
				'pagination' => false
			)),
			'template' => "{items}",
			'enablePagination' => false,
			'columns' => array(
				array(
					'header' => '',
					'type' => 'raw',
					'value' => '$row+1'
				),
				array(
					'name' => 'materialModelId',
					'type' => 'raw',
					'value' => '$data->materialModel->getModelName()',
					'header' => $materialModel->getAttributeLabel('materialModelId'),
				),
				array(
					'name' => 'amount',
					'type' => 'amount',
					'header' => $materialModel->getAttributeLabel('amount'),
				),
				array(
					'name' => 'unit',
					'header' => $materialModel->getAttributeLabel('unit'),
				),
				array(
					'name' => 'amountStandardUnit',
					'type' => 'amount',
					'header' => $materialModel->getAttributeLabel('amountStandardUnit'),
				),
				array(
					'name' => 'materialModel.unit',
					'header' => '标准单位',
				),
				array(
					'name' => 'note',
					'header' => $materialModel->getAttributeLabel('note'),
				),
			),
		));
